/**
 * Charts2：雷达图
 */
import React  from 'react'
import style from './index.less'
import moment from 'moment'
import {IECharts} from '../../../../components'

const Charts2=({
	name=['雷达图'],
	indicator=[
	 { name: '指数1', max: 6500},
	 { name: '指数2', max: 30000},
	 { name: '指数3', max: 16000},
	 { name: '指数4', max: 38000}
	],
	color='#f96868',
	data=[
		{
			value : [4300, 28000, 10000, 35000],
			name
		}
	],
	height=300
})=>{
	const myProps={
		option : {
			title: {
	      text: '',
	    },
	    // legend: {
	    //   data: name,
	    //   bottom: 0,
	    //   selectedMode: false,
	    // },
	    tooltip: {
	      trigger: 'axis',
	    },
			radar: [{
	      shape: 'circle',
	      indicator,
	      name: {
	        show: true,
	        textStyle: {
	          color: '#888',
						fontSize:16,
	        },
	      },
	      radius: 80,
	      splitArea: {
	        show: false,
	      },
	      splitNumber: 4,
	      splitLine: {
	        lineStyle: {
	          color: '#e6e6e6',
	        },
	      },
	      axisLine: {
	        lineStyle: {
	          color: '#ccd6eb',
	        },
	      },
	    }],
	    series: [{
	      type: 'radar',
	      name,
	      tooltip: {
	        trigger: 'item',
	      },
	      itemStyle: {
	        normal: {
	          color,
	        },
	      },
	      areaStyle: {
	        normal: {
	          opacity: 0.75,
	        },
	      },
	      data
	    }]
		}
	}
  return(
    <div  className={`chart ${style.chart}`} style={{height}}>
      <IECharts {...myProps} resizable={true}/>
    </div>
  )
}

Charts2.propTypes={
	// data
}

export default Charts2
